package com.iotechn.unimall.app.api.enterprise;

import com.dobbinsoft.fw.core.Const;
import com.dobbinsoft.fw.core.annotation.HttpMethod;
import com.dobbinsoft.fw.core.annotation.HttpOpenApi;
import com.dobbinsoft.fw.core.annotation.HttpParam;
import com.dobbinsoft.fw.core.annotation.HttpParamType;
import com.dobbinsoft.fw.core.annotation.param.NotNull;
import com.dobbinsoft.fw.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.EnterpriseDO;

@HttpOpenApi(group = "enterprise", description = "企业服务")
public interface EnterpriseService {

    @HttpMethod(description = "自己加入的企业详情")
    public EnterpriseDO detail(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId
    ) throws ServiceException;

    @HttpMethod(description = "取消绑定")
    public String unbind(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId,
            @HttpParam(name = Const.USER_ACCESS_TOKEN, type = HttpParamType.HEADER, description = "访问令牌") String accessToken
    )throws ServiceException;

    @HttpMethod(description = "企业列表的详情")
    public EnterpriseDO eDetail(
            @NotNull @HttpParam(name = "enterpriseId", type = HttpParamType.COMMON, description = "企业id") Long enterpriseId,
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户Id") Long userId
    ) throws ServiceException;
}
